% Save results
% True IRFs
Results.the_true_irf=the_true_irf;
Results.the_rms_irf=the_rms_irf;

% Criteria
Results.RMSE_result=RMSE_result_plot;
Results.BIAS_result=BIAS_result_plot;
Results.STD_result=STD_result_plot;

% Coverage rate
Results.CV.VAR.seqblock=CVG_var_seqblock_avg;
Results.CV.VAR.bootrep=CVG_var_bootrep_avg;
Results.CV.LP.seqblock=CVG_lp_seqblock_avg;
Results.CV.LP.bootrep=CVG_lp_bootrep_avg;
Results.CV.Pool.seqblock=CVG_pool_seqblock_avg;
Results.CV.Pool.seqblock_bs1=CVG_pool_seqblock_avg_bs1;
Results.CV.Pool.seqblock_bs2=CVG_pool_seqblock_avg_bs2;
Results.CV.Pool.bootrep=CVG_pool_bootrep_avg;

% Average length
Results.AL.VAR.seqblock=IRF_VAR_seqblock_avglength;
Results.AL.VAR.bootrep=IRF_VAR_bootrep_avglength;
Results.AL.LP.seqblock=IRF_LP_seqblock_avglength;
Results.AL.LP.bootrep=IRF_LP_bootrep_avglength;
Results.AL.Pool.seqblock=IRF_Pool_seqblock_avglength;
Results.AL.Pool.seqblock_bs1=IRF_Pool_seqblock_avglength_bs1;
Results.AL.Pool.seqblock_bs2=IRF_Pool_seqblock_avglength_bs2;
Results.AL.Pool.bootrep=IRF_Pool_bootrep_avglength;

% Correlation
Results.COR_VARLP_seqblock=correlation_varlp_seqblock_save;
Results.COR_VARLP_seqblock_bs1=correlation_varlp_seqblock_save_bs1;
Results.COR_VARLP_seqblock_bs2=correlation_varlp_seqblock_save_bs2;
Results.COR_VARLP_bootrep=correlation_varlp_bootrep_save;

% Saving results
if rho==0.3   
     Simulation_results = fullfile(spath, 'AR1DGP_03.mat');
     save(Simulation_results, 'Results');
elseif rho==0.6
     Simulation_results = fullfile(spath, 'AR1DGP_06.mat');
     save(Simulation_results, 'Results');
elseif rho==0.8
     Simulation_results = fullfile(spath, 'AR1DGP_08.mat');
     save(Simulation_results, 'Results');
end